package com.blog.backend.service.impl;

import com.blog.backend.domain.DTO.ClassificationDTO;
import com.blog.backend.mapper.BlogSettingMapper;
import com.blog.backend.service.BlogSettingService;
import com.blog.common.core.domain.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

/**
 * @Author:Auman Time：2024/5/10 13:53
 */
@Service
public class BlogSettingServiceImpl implements BlogSettingService {

    @Autowired
    private BlogSettingMapper mapper;

    @Autowired
    private RedisTemplate<String ,String> redisTemplate;

    @Override
    public R<String> classification(ClassificationDTO dto) {
        redisTemplate.opsForList().leftPush("classification",dto.getClassification());
        return R.ok();
    }
}
